package SensorTests;

import lejos.nxt.*;

public class SoundScope {
  public static void main(String[] args) throws Exception {
    SoundSensor sound = new SoundSensor(SensorPort.S1);

    while (!Button.ESCAPE.isPressed()) {
      LCD.clear();
      for (int i = 0; i < 100; i++) {
        LCD.setPixel(1, i, 60 - (sound.readValue() / 2));
        Thread.sleep(20);
      }
    }
  }
}